<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity6" >
<head>
    <meta charset="UTF-8">
    <title>Home Page</title>
</head>
<body>
    <h1>主界面</h1>
    <a href="/logout">Logout</a>	
	<form action="/logout" method="post">
		<input name="_csrf" th:value="${_csrf.token}" >
		<input type="submit">
	</form>
	
	<hr>

	<h3>身份: <span sec:authentication="principal"></span></h3>
	<h3>凭证: <span sec:authentication="credentials"></span></h3>
	<h3>权限列表: <span sec:authentication="authorities"></span></h3>
	<h3>字名: <span sec:authentication="name"></span></h3>
	<h3>明细: <span sec:authentication="details"></span></h3>
	
	<a href="" sec:authorize="hasAuthority('user:list')">查询用户</a> <br>
	<a href="" sec:authorize="hasAuthority('user:add')">新增用户</a> <br>
	<a href="" sec:authorize="hasAuthority('user:delete')">删除用户</a> <br>
	<a href="" sec:authorize="hasAuthority('user:update')">更改用户</a> <br>
</body>
</html>